package com.aixin.csopuser.repository;

import com.aixin.csopuser.domain.AxjyOrderDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface AxjyOrderDetailRepository extends JpaRepository<AxjyOrderDetail, Long> {

    @Query("select order from AxjyOrderDetail order join AxjyCustomerLogin login on order.buyerUserId=login.id " +
            "where login.mobile=:mobile")
    List<AxjyOrderDetail> findByMobile(@Param("mobile") String mobile);
}
